home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-09-28 | 6.5 KB | 138 lines |
- '*************************************
- '* AMOS Professional Interface *
- '* *
- '* Full working demo *
- '* *
- '* (c) Europress Software *
- '* *
- '* Ronnie Simpson *
- '*************************************
- Set Buffer 10
- Load "AMOSPro_Tutorial:Tutorials/Interface/Example_resource.abk"
- Load "AMOSPro_Examples:Music/Music.Abk"
- Load "AMOSPro_Examples:Samples/Instruments.Abk",8
- Sam Bank 8
- Resource Bank 16
- Dim V$(6)
- V$(0)="Synth Banjo" : V$(1)="Synth Bass" : V$(2)="Rock Guitar"
- V$(3)="Wah Synth" : V$(4)="Organ" : V$(5)="Panflute"
- MV=63
- Resource Screen Open 0,640,200,0
- Flash Off : Curs Off : Cls 0 : Paper 0 : Pen 8
- Palette ,,,,$335,$88A,$AAC,$CCE
- Wait Vbl
-
- ' Define text used in buttons: you should never
- ' define a text directly within the button, each time
- ' it is pressed, it asks for buffer space. You'll get
- ' an 'Out of buffer' error after a certain amount of
- ' switches....
- A$=A$+"SVar 4,'QUIT';"
- A$=A$+"SVar 5,'Boom';"
- A$=A$+"SVar 6,'Shoot';"
- A$=A$+"SVar 7,'Start';"
- A$=A$+"SVar 8,'Stop';"
- A$=A$+"SVar 9,'On';"
- A$=A$+"SVar 10,'Off';"
-
- ' The main program
- A$=A$+"BOx 0,0,1,640,150;"
- A$=A$+"BAse 0,0;"
- A$=A$+"SIze 640,150;"
- A$=A$+"LIne 8,8,54,632;"
- A$=A$+"POutline 208,16,'AMOS Professional Interface',3,13;"
- A$=A$+"LIne 8,25,54,632;SF 0,4;"
- A$=A$+"POutline 450,110,'Sound Explorer',10,3;SF0,0;"
- A$=A$+"BOx 8,36,1,112,125;"
- A$=A$+"LIne 20,52,10,104;PO XA24+,YA9-,'MUSIC',0,14;SF 0,1;"
- A$=A$+"POutline XA4-,YA53+,'Volume',0,12;SF0,0;"
- A$=A$+"BUtton 14,16,YB1+,16,8,0,0,1;[UN 0,0,BP34+;UN 24,2,44;PO 44,6,1VA#,0,14;][BR 0;]"
- A$=A$+"BUtton 15,16,YB1+,16,8,0,0,1;[UN 0,0,BP36+;UN 24,YA7-,44;PO 44,YB10-,1VA#,0,14;][BR 0;]"
- A$=A$+"BOx 416,36,82,520,100;"
- A$=A$+"LIne 424,52,10,512;PO XA20+,YA9-,'FILTER',0,12;"
- A$=A$+"BOx 528,36,1,632,100;"
- A$=A$+"LIne 536,52,10,624;PO XA16+,YA9-,'EFFECTS',0,15;"
- A$=A$+"BUtton 1,SX72-,SY20-,56,14,0,0,1;[UN 0,0,BP49+;PR 13,4,4VA,8;][BR0;]"
- A$=A$+"BUtton 1,16,YA,56,14,0,0,1;[UN 0,0,BP49+;PR 13,4,4VA,8;][BR0;]"
- A$=A$+"BUtton 2,552,64,64,14,0,0,1;[UN 0,0,BP43+;PO 12,3,5VA,0,9;][BR0;]"
- A$=A$+"BUtton 3,XA,YA 16+,56,14,0,0,1;[UN 0,0,BP43+;PO 8,3,6VA,0,15;][BR0;]"
- A$=A$+"BUtton 4,32,64,56,14,0,0,1;[UN 0,0,BP43+;PO 8,3,7VA,0,2;][BC5,0;]"
- A$=A$+"BUtton 5,32,80,56,14,1,0,1;[UN 0,0,BP43+;PO 12,3,8VA,0,3;][BC4,0;]"
- A$=A$+"BUtton 8,440,64,56,14,0,0,1;[UN 0,0,BP43+;PO 20,3,9VA,0,2;][BC9,0;]"
- A$=A$+"BUtton 9,440,80,56,14,1,0,1;[UN 0,0,BP43+;PO 16,3,10VA,0,3;][BC8,0;]"
- A$=A$+"BOx 0,150,1,80,198;SW 1;SP 32,1;IN 0,10,0;GB XA4+,YA2+,XB6-,YB3-;"
- A$=A$+"BOx 560,150,1,640,198;GB XA4+,YA2+,XB6-,YB3-;"
- A$=A$+"BOx 80,126,82,560,149;"
- A$=A$+"UNpack 80,150,80;UN XA32+,YA,80;UNXA32+,YA,80;UN XA32+,YA,80;UN XA32+,YA,80;"
- A$=A$+"UNpack XA32+,YA,80;UN XA32+,YA,80;UNXA32+,YA,80;UN XA32+,YA,80;UN XA32+,YA,80;"
- A$=A$+"UNpack XA32+,YA,80;UN XA32+,YA,80;UNXA32+,YA,80;UN XA32+,YA,80;UN XA32+,YA,80;"
- A$=A$+"UNpack 104,150,81;UN XA32+,YA,81;UNXA64+,YA,81;UN XA32+,YA,81;UN XA32+,YA,81;"
- A$=A$+"UNpack XA64+,YA,81;UN XA32+,YA,81;UNXA64+,YA,81;UN XA32+,YA,81;UN XA32+,YA,81;"
- A$=A$+"BUutton 25,80,150,25,48,0,0,1;[][BR0;]KY90,0;"
- A$=A$+"BUutton 27,XA40+,YA,16,48,0,0,1;[][BR0;]KY88,0;"
- A$=A$+"BUutton 29,XA32+,YA,25,48,0,0,1;[][BR0;]KY67,0;"
- A$=A$+"BUutton 30,XA24+,YA,25,48,0,0,1;[][BR0;]KY86,0;"
- A$=A$+"BUutton 32,XA40+,YA,16,48,0,0,1;[][BR0;]KY66,0;"
- A$=A$+"BUutton 34,XA32+,YA,16,48,0,0,1;[][BR0;]KY78,0;"
- A$=A$+"BUutton 36,XA32+,YA,25,48,0,0,1;[][BR0;]KY77,0;"
- A$=A$+"BUutton 37,XA24+,YA,25,48,0,0,1;[][BR0;]KY81,0;KY44,0;"
- A$=A$+"BUutton 39,XA40+,YA,16,48,0,0,1;[][BR0;]KY87,0;"
- A$=A$+"BUutton 41,XA32+,YA,25,48,0,0,1;[][BR0;]KY69,0;"
- A$=A$+"BUutton 42,XA24+,YA,25,48,0,0,1;[][BR0;]KY82,0;"
- A$=A$+"BUutton 44,XA40+,YA,16,48,0,0,1;[][BR0;]KY84,0;"
- A$=A$+"BUutton 46,XA32+,YA,16,48,0,0,1;[][BR0;]KY89,0;"
- A$=A$+"BUutton 48,XA32+,YA,25,48,0,0,1;[][BR0;]KY85,0;"
- A$=A$+"BUutton 49,XA24+,YA,25,48,0,0,1;[][BR0;]KY73,0;"
- A$=A$+"BUutton 26,104,150,16,28,0,0,1;[][BR0;]KY83,0;"
- A$=A$+"BUutton 28,XA32+,YA,16,28,0,0,1;[][BR0;]KY68,0;"
- A$=A$+"BUutton 31,XA64+,YA,16,28,0,0,1;[][BR0;]KY71,0;"
- A$=A$+"BUutton 33,XA32+,YA,16,28,0,0,1;[][BR0;]KY72,0;"
- A$=A$+"BUutton 35,XA32+,YA,16,28,0,0,1;[][BR0;]KY74,0;"
- A$=A$+"BUutton 38,XA64+,YA,16,28,0,0,1;[][BR0;]KY50,0;"
- A$=A$+"BUutton 40,XA32+,YA,16,28,0,0,1;[][BR0;]KY51,0;"
- A$=A$+"BUutton 43,XA64+,YA,16,28,0,0,1;[][BR0;]KY53,0;"
- A$=A$+"BUutton 45,XA32+,YA,16,28,0,0,1;[][BR0;]KY54,0;"
- A$=A$+"BUutton 47,XA32+,YA,16,28,0,0,1;[][BR0;]KY55,0;"
- A$=A$+"VLine 168,36,19,68;IN 0,0,0;GS 171,39,179,64;"
- A$=A$+"VSlider 6,172,40,7,24,0,0,4,1;[ZC 7,ZP;]"
- A$=A$+"BOx 184,36,1,364,68;IN 0,0,0;GS 189,38,354,65;"
- A$=A$+"AList 7,192,40,20,3,0VA,0,4,4,9;[ZC 7,0VA ZP AR;]"
- A$=A$+"BOx 152,73,1,376,125;"
- A$=A$+"POutline 204,77,'Channel Volumes',0,13;"
- A$=A$+"INk 7,0,0; GS 163,89,365,94;IN 0,0,0;GS 162,88,366,95;IN 14,0,0;GS161,87,367,96;"
- A$=A$+"HSlider 10,XA3+,YA3+,200,4,62,0,62,1;[ZC 10,ZP;]"
- A$=A$+"INk 7,0,0; GS 163,97,365,102;IN 0,0,0;GS 162,96,366,103;IN 14,0,0;GS161,95,367,104;"
- A$=A$+"HSlider 11,XA3+,YA3+,200,4,62,0,62,1;[ZC 11,ZP;]"
- A$=A$+"INk 7,0,0; GS 163,105,365,110;IN 0,0,0;GS 162,104,366,111;IN 14,0,0;GS161,103,367,112;"
- A$=A$+"HSlider 12,XA3+,YA3+,200,4,62,0,62,1;[ZC 12,ZP;]"
- A$=A$+"INk 7,0,0; GS 163,113,365,118;IN 0,0,0;GS 162,112,366,119;IN 14,0,0;GS161,111,367,120;"
- A$=A$+"HSlider 13,XA3+,YA3+,200,4,62,0,62,1;[ZC 13,ZP;]"
- A$=A$+"POutline 240,YA16+,'Keyboard Equivalents',0,11;"
- A$=A$+"PRint 92,YA10+,'Z X C V B N M Q W E R T Y U I',7;"
- A$=A$+"PRint 108,YA,'S D G H J 2 3 5 6 7',4;"
- A$=A$+"PRint 92,YA45+,'C D E F G A B C D E F G A B C',4;"
- A$=A$+"EXit;"
- Led Off
- Dialog Open 1,A$,16,4096
- Vdialog(1,0)=Array(V$(0))
- Vdialog(1,1)=MV
- R=Dialog Run(1)
- Repeat
- D=Dialog(1)
- If D=2 Then Boom
- If D=3 Then Shoot
- If D=4 Then Music 1
- If D=5 Then Music Off
- If D=7 Then S=Rdialog(1,7)+1 : Sample S To 15 : Sam Play S
- If D=8 Then Led On
- If D=9 Then Led Off
- If D=10 Then Volume %1,Rdialog(1,10)
- If D=11 Then Volume %10,Rdialog(1,11)
- If D=12 Then Volume %100,Rdialog(1,12)
- If D=13 Then Volume %1000,Rdialog(1,13)
- If D=14 and MV<63 Then Inc MV : Mvolume MV : Vdialog(1,1)=MV
- If D=15 and MV>0 Then Dec MV : Mvolume MV : Vdialog(1,1)=MV
- If D>24 Then Play D+12,0
- Until D=1
- Dialog Close
- Erase All